package com.chinasoft.pojo;

import lombok.Data;

@Data
public class Result<T> {
    private Integer code;
    private String msg;
    private Object data;

    public Result(T data, String message) {
        this.code = 200;
        this.msg = message;
        this.data = data;
    }

    public Result(Integer code, String msg,Object  o) {
        this.code = code;
        this.msg = msg;
        this.data = o;

    }

    public Result() {

    }

    public static Result fail(Integer code, String msg) {
        Result result = new Result( code, msg, null);
        return result;
    }
}
